<?php

$strHost = "http://" .$_SERVER['HTTP_HOST'] . '/job-search';
$strUrl  = "http://" .$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

if(strpos($_SERVER['REQUEST_URI'], '/malaysia/') !== false){
	$strUrl = str_replace ('.jobstreet.com', '.jobstreet.com.my', $strUrl);
	header("Location: ".$strUrl);
}else if(strpos($_SERVER['REQUEST_URI'], '/singapore/') !== false){
	$strUrl = str_replace ('.jobstreet.com', '.jobstreet.com.sg', $strUrl);
	header("Location: ".$strUrl);
}else if(strpos($_SERVER['REQUEST_URI'], '/philippines/') !== false){
	$strUrl = str_replace ('.jobstreet.com', '.jobstreet.com.ph', $strUrl);
	header("Location: ".$strUrl);
}else if(strpos($_SERVER['REQUEST_URI'], '/vietnam/') !== false || strpos($_SERVER['REQUEST_URI'], '/vietnamese/') !== false){
	$strUrl = str_replace ('.jobstreet.com', '.jobstreet.vn', $strUrl);
	header("Location: ".$strUrl);
}else if(strpos($_SERVER['REQUEST_URI'], '/thailand/') !== false || strpos($_SERVER['REQUEST_URI'], '/thai/') !== false){
	$strUrl = str_replace ('.jobstreet.com', '.jobstreet.co.th', $strUrl);
	header("Location: ".$strUrl);
}else if(strpos($_SERVER['REQUEST_URI'], '/indonesia/') !== false || strpos($_SERVER['REQUEST_URI'], '/indonesian/') !== false){
	$strUrl = str_replace ('.jobstreet.com', '.jobstreet.co.id', $strUrl);
	header("Location: ".$strUrl);
}

if(strpos($_SERVER['HTTP_HOST'], 'job-search-dev') !== false)
{
	$strType = 'Dev';
}
else if(strpos($_SERVER['HTTP_HOST'], 'job-search-stage') !== false)
{
	$strType = 'Stage';
}

?>
<b>Job Search <?php echo $strType ." ";?>By Country :</b>
<a href="<?php echo $strHost;?>/malaysia/">Malaysia</a> |
<a href="<?php echo $strHost;?>/singapore/">Singapore</a> |
<a href="<?php echo $strHost;?>/philippines/">Philippines</a> |
<a href="<?php echo $strHost;?>/india/">India</a> |
<a href="<?php echo $strHost;?>/vietnam/">Vietnam</a> |
<a href="<?php echo $strHost;?>/vietnamese/">Vietnamese</a> |
<a href="<?php echo $strHost;?>/thailand/">Thailand</a> |
<a href="<?php echo $strHost;?>/thai/">Thai</a> |
<a href="<?php echo $strHost;?>/indonesia/">Indonesia</a> |
<a href="<?php echo $strHost;?>/indonesian/">Indonesian</a> |
<a href="<?php echo $strHost;?>/japan">Japan</a>
<br><br>
<b>Job Search <?php echo $strType ." ";?>Microsite :</b>
<br>Malaysia : 
<a href="<?php echo $strHost;?>/campus/malaysia/">Campus Jobs</a> | 
<a href="<?php echo $strHost;?>/low-application/malaysia">Low application</a> |
<a href="<?php echo $strHost;?>/mohe/">mohe</a> |
<a href="<?php echo $strHost;?>/malaysia/job-classified.php">Classified</a> | 
<a href="<?php echo $strHost;?>/mwl">MWL</a> |
<a href="<?php echo $strHost;?>/volunteer/malaysia">Volunteering Job</a> 

<br>Singapore : 
<a href="<?php echo $strHost;?>/campus/singapore/">Campus Jobs</a> | 
<a href="<?php echo $strHost;?>/low-application/singapore">Low application</a> |
<a href="<?php echo $strHost;?>/100k/singapore/">100K Jobs</a> | 
<a href="<?php echo $strHost;?>/tanchiak/singapore">Tanchiak</a> |
<a href="<?php echo $strHost;?>/singapore/job-classified.php">Classified</a> |
<a href="<?php echo $strHost;?>/volunteer/singapore">Volunteering Job</a>

<br>Philippines : 
<a href="<?php echo $strHost;?>/campus/philippines/">Campus Jobs</a> | 
<a href="<?php echo $strHost;?>/low-application/philippines">Low application</a> |
<a href="<?php echo $strHost;?>/poea/philippines/advance-job-search.php">POEA Jobs</a> | 
<a href="<?php echo $strHost;?>/manager/philippines/">Manager Jobs</a> | 
<a href="<?php echo $strHost;?>/call-center-bpo/ph/job-opening.php">Call Center BPO Jobs</a> |

<br>Indonesia :
<a href="<?php echo $strHost;?>/campus/indonesia">Campus Jobs</a> | 
<a href="<?php echo $strHost;?>/low-application/indonesia">Low application</a> |

<br>Thailand :
<a href="<?php echo $strHost;?>/campus/thailand">Campus Jobs</a> | 
<a href="<?php echo $strHost;?>/low-application/thailand">Low application</a> |

<br>XML feeds:
<a href="<?php echo $strHost;?>/SearchXML/default/search-xml.php">XML feed</a> |
<a href="<?php echo $strHost;?>/SearchXML/iphone/search-xml.php">Iphone feed</a> |
